package com.bjc.core.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.bjc.core.bean.request.UserLoginReqVO;
import com.bjc.core.bean.response.UserInfoVO;
import com.bjc.core.bean.response.UserLoginVO;


/**
 * 登录Dao
 * @author zhengwei
 * @dateTime 2017-7-17
 */
public interface IUserLoginDao {
	
	UserLoginVO getUserByWorkId(String workId);
	/**
	 * 根据work_id和签到时间查询当天是否有请假
	 * @param map
	 * @return
	 */
	Map<String, Object> selectLevel(Map<String, Object> map);
	/**
	 * 获取用户对象
	 * @param workId
	 * @return
	 */
	UserLoginVO selectByPrimaryKey(String workId);
	/**
	 * 查询满勤
	 * @param workId
	 * @return
	 */
	Double selectTotalHours(String workId);
	List<String> selectByParentWorkId(Map<String, Object> map);
	/**
	 * 根据登录名查询 工号
	 * @param username
	 * @return
	 */
	String getUserByLoginName(@Param("username") String username);
	
	UserLoginVO getUsers(@Param("workId") String workId);
	
	UserLoginVO getLoginUse(Map<String, Object> map);
	
	List<UserLoginVO> getUserList(Map<String, Object> map);
	List<UserLoginVO> getUserAll();

	/**
	 * 获取用户对象
	 * @param UserLoginReqVO vo
	 * @return
	 */
	UserLoginVO getUser(UserLoginReqVO vo);
	
	/**
	 * 验证是否黑名单
	 * @param userId
	 * @return
	 */
	Integer chenkBlack(Integer userId);
	
	/**
	 * 验证是否被辞退
	 * @param userId
	 * @return
	 */
	Integer chenkDismiss(Integer userId);
	
	/**
	 * 验证离职辞退表
	 * @param userId
	 * @return
	 */
	Integer chenkUserOut(Integer userId);
	
	/**
	 * 获取部门权限下的用户
	 * @param map
	 * @return
	 */
	List<UserLoginVO> findChildUser(Map<String, Object> map);
	
	/**
	 * 根据workId获取用户对象
	 * @param workId
	 * @return
	 */
	UserInfoVO selectByWorkId(String workId);
	
}
